<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>动态生成导航栏布局</title>
    <style>
     *{
         padding: 0;
         margin:0;
         list-style: none;
         text-decoration: none;
     }
     :root,body{
         overflow: hidden;
         font-size: 12px;
     }
     .wrapper{
         width:500px;
         height: 500px;
         margin:100px auto;
         box-shadow: 0 0 2px 5px #ddd;
     }
     .wrapper ul{
         width: 100%;
         height: 30px;
         display: flex;
     }
     .wrapper ul li{
         flex: 1 1 auto;
         height: 100%;
         text-align: center;
         line-height: 30px;
         font-size: 2rem;
         border-radius: 5px;
         color: #f20;
         cursor: pointer;
         transition: all .5 ease-in;
     }
     .wrapper ul li:hover{
         background-color: #f20;
         color: #fff;
     }
    </style>
</head>
<body>
 <div class="wrapper">
     <ul>
         <li><a href="#">天猫</a></li>
         <li><a href="#">淘宝</a></li>
         <li><a href="#">聚划算</a></li>
         <li><a href="#">京东</a></li>
         <li><a href="#">首页</a></li>
         <li><a href="#">买就送</a></li>
     </ul>
 </div>
</body>
</html>